Skip to content

fix: bind hover and pressed states to background#1634

Open
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0612-fix-issue-364531
Open

fix: bind hover and pressed states to background#1634
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0612-fix-issue-364531

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
  1. Add D.ColorSelector.hovered and D.ColorSelector.pressed properties to the app item background delegate
  2. Fix taskbar app retaining selected state after long-press popup is dismissed by clicking desktop blank area

Log: fix taskbar app keeping selected state after dismissing long-press popup

fix: 绑定悬停和按下状态到背景

  1. 为应用项背景委托添加 D.ColorSelector.hovered 和 D.ColorSelector.pressed 属性
  2. 修复单指长按任务栏应用弹出面板后,点击桌面空白处 任务栏应用依然有选中状态的问题

Log: 修复长按弹出面板关闭后任务栏应用残留选中状态的问题
PMS: BUG-364531

Summary by Sourcery

Bug Fixes:

  • Resolve taskbar app items incorrectly remaining in a selected state after dismissing the long-press popup by clicking on the desktop.

@sourcery-ai

sourcery-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Binds the app item background delegate’s hover and press visual states to existing input handlers so taskbar items correctly reset their selected state after dismissing a long-press popup.

Sequence diagram for binding hover and pressed states to background delegate

sequenceDiagram
    actor User
    participant hoverHandler
    participant mouseArea
    participant backgroundDelegate
    participant D_ColorSelector as D_ColorSelector

    User->>hoverHandler: hovered
    hoverHandler-->>backgroundDelegate: hovered
    backgroundDelegate-->>D_ColorSelector: D.ColorSelector.hovered

    User->>mouseArea: press
    mouseArea-->>backgroundDelegate: pressed
    backgroundDelegate-->>D_ColorSelector: D.ColorSelector.pressed

    User->>User: [popup dismissed by clicking desktop]
    mouseArea-->>backgroundDelegate: pressed false
    backgroundDelegate-->>D_ColorSelector: D.ColorSelector.pressed false
Loading

File-Level Changes

Change Details Files
Bind color selector hover/pressed states to input handlers on taskbar app items to fix lingering selected state.
  • Expose the app item hover state via D.ColorSelector.hovered bound to hoverHandler.hovered.
  • Expose the app item pressed state via D.ColorSelector.pressed bound to mouseArea.pressed.
  • Ensure background delegate visual state updates when the long-press popup is dismissed by interacting with the desktop.
panels/dock/taskmanager/package/AppItem.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider verifying that hoverHandler and mouseArea cover the same visual region as the app item background; if their geometries differ, the new D.ColorSelector.hovered/pressed bindings could desynchronize background feedback from the actual interactive area.
  • To improve readability, you might group the new D.ColorSelector.hovered and D.ColorSelector.pressed bindings with any other state-related properties (e.g. isActive, displayMode) or add a short comment explaining that these are wired to the background’s visual states.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider verifying that `hoverHandler` and `mouseArea` cover the same visual region as the app item background; if their geometries differ, the new `D.ColorSelector.hovered/pressed` bindings could desynchronize background feedback from the actual interactive area.
- To improve readability, you might group the new `D.ColorSelector.hovered` and `D.ColorSelector.pressed` bindings with any other state-related properties (e.g. `isActive`, `displayMode`) or add a short comment explaining that these are wired to the background’s visual states.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mhduiy, MyLeeJiEun

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/merge

1. Add D.ColorSelector.hovered and D.ColorSelector.pressed
   properties to the app item background delegate
2. Fix taskbar app retaining selected state after long-press
   popup is dismissed by clicking desktop blank area

Log: fix taskbar app keeping selected state after dismissing long-press popup

fix: 绑定悬停和按下状态到背景

1. 为应用项背景委托添加 D.ColorSelector.hovered 和
   D.ColorSelector.pressed 属性
2. 修复单指长按任务栏应用弹出面板后,点击桌面空白处
   任务栏应用依然有选中状态的问题

Log: 修复长按弹出面板关闭后任务栏应用残留选中状态的问题
PMS: BUG-364531
@MyLeeJiEun MyLeeJiEun force-pushed the fork-from-master-0612-fix-issue-364531 branch from 0d84fe5 to edf9c9f Compare June 14, 2026 07:07
@deepin-bot

deepin-bot Bot commented Jun 14, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants